package lanqiao;

public class bestTeam {
    public static void main(String[] args) {
        int[] arr = {1,2,4,4,3,1};
        int max = Integer.MIN_VALUE;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i]>max){
                max = arr[i];
            }
        }
        int tag = 0;
        int best =1;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i]==max){
                tag++;
            }else {
                tag = 0;
            }
            best = tag>best ? tag : best;
        }
        System.out.println(best);
    }
}
